home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / MorphOS / Epic4_mos / share / epic / script / autoop < prev    next >
Encoding:
Text File  |  2002-10-28  |  2.0 KB  |  77 lines

  1. # AutoOp   by Ian Frechette 12-10-92 
  2. # EPIC modifications as necessary by Jeremy Nelson
  3.  
  4. # the people you want to be opped by default.  Wildcards are allowed.
  5. # the patterns must be of the form user@host
  6. if (!op_list) 
  7.     {@ op_list = [bob@example.bob.edu foo@*.bar.com]}
  8.  
  9. # the channels you want people to be opped on by default.  Wildcards
  10. # are allowed.  '*' simply means all channels apply.
  11. if (!chan_list)
  12.     {@ chan_list = [* #example]}
  13.  
  14. # Show the the people currently in the autoop list
  15. alias showop
  16. {
  17.     @ count = 0
  18.     @ ao.name = []
  19.     echo *** AutoOp list.  Addop user@host to add.  Delop <num>  to remove
  20.     echo *** <num> nickname!username@hostname 
  21.     for ao.name in ($op_list) {
  22.         echo *** $[5]count $ao.name
  23.         @ count++
  24.     }
  25. }
  26.  
  27. # Just like showop but works with channels.
  28. alias showchan
  29. {
  30.     @ count = 0
  31.     @ ao.name = []
  32.     echo *** AutoOp chan list.  Addchan #channel add.  Delchan <num>  to remove
  33.     echo *** <num> #channel
  34.     for ao.name in ($chan_list) {
  35.         echo *** $[5]count $ao.name
  36.         @ count++
  37.     }
  38. }
  39.  
  40. # Given a number.. deletes that person from the autoop list.. 
  41. # use SHOWOP to list.
  42. alias delop {
  43.     if (rmatch("$0" *1 *2 *3 *4 *5 *6 *7 *8 *9 *0))
  44.         { @ op_list = notw($0 $op_list) }
  45.         { echo *** Usage: delop <number>;echo *** See showop }
  46. }
  47.     
  48. # Given a number.. deletes that channel from the autoop channel list.. 
  49. # use SHOWCHAN to list.
  50. alias delchan {
  51.     if (rmatch("$0" *1 *2 *3 *4 *5 *6 *7 *8 *9 *0))
  52.         { @ chan_list = notw($0 $chan_list) }
  53.         { echo *** Usage: delchan <number>;echo *** See showchan }
  54. }
  55.  
  56. # Add an autochanop to the list.
  57. alias addop {
  58.     if ([$0])
  59.     { push op_list $0 }
  60.     { echo *** Usage addop username@host;echo *** wildcards are allowed }
  61. }
  62.  
  63. # Add an autochanop channel to the list.
  64. alias addchan {
  65.     if ([$0])
  66.     { push chan_list $0 }
  67.     { echo *** Usage addchan #channel;echo *** wildcards are allowed }
  68. }
  69.  
  70. #
  71. # the actual ON that does the work
  72. # This is the hook as it would be used in ircii-EPIC
  73. #
  74. on #-join 666 '% \\[$chan_list\\] \\[$op_list\\]' {
  75.     timer ${10 + rand(10)} if \(!ischanop\($0 $1\)\) \{//mode $1 +o $0\}
  76. }
  77.